<!doctype html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>Spark date chart example</title>
		<script type="text/javascript" src="../../lib/jquery-1.4.4.js"></script>
		<script type="text/javascript" src="../../lib/jquery.jqplot.js"></script>
		<script type="text/javascript" src="../../lib/jqplot.dateAxisRenderer.js"></script>
		<script type="text/javascript" src="../../lib/jqplot.categoryAxisRenderer.js"></script>
		<script type="text/javascript" src="../../src/jquery.spark.js"></script>
		<link rel="stylesheet" href="../screen.css" type="text/css" media="screen, projection">
		<link rel="stylesheet" href="../print.css" type="text/css" media="print">
		<link rel="stylesheet" href="../../lib/jquery.jqplot.min.css" type="text/css">
	</head>
	<body>
		<div class="container">
			<div class="span-24 last prepend-top">
				<h1>Spark date chart example</h1>
				<p>
					This spark queries GESIS data, asking about the results of
					elections from 1994-2009 and displaying them in a chart.
					<div class="spark"
						data-spark-endpoint="datechart.sparql"
						data-spark-format="../../src/jquery.spark.datechart.js"
						data-spark-query="
PREFIX  sdmx-measure: <http://purl.org/linked-data/sdmx/2009/measure#>
PREFIX  gesis:  <http://lod.gesis.org/vocab#>
PREFIX  rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX  qb:   <http://purl.org/linked-data/cube#>
PREFIX  rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX  dcterms: <http://purl.org/dc/terms/>

SELECT  ?s ?series ?series_label ?time ?value
FROM <http://gesis-lod.appspot.com/data?code=14111&ags=05&jahr=2009>
FROM <http://gesis-lod.appspot.com/data?code=14111&ags=05&jahr=2005>
FROM <http://gesis-lod.appspot.com/data?code=14111&ags=05&jahr=2002>
FROM <http://gesis-lod.appspot.com/geo.rdf>
FROM <http://gesis-lod.appspot.com/parteien.rdf>
FROM <http://lod.gesis.org/lodpilot/ALLBUS/ZA4570agg.rdf>

WHERE {
    ?s qb:dataset <http://gesis-lod.appspot.com/data?code=14111#ds> .
    ?s dcterms:date ?time .
    ?s gesis:partei ?series .
    ?series rdfs:label ?series_label .
    ?s sdmx-measure:obsValue ?value .
}
					">
						<em>loading&hellip;</em>
					</div>		
				</p>
				<p>
					<a href="index.html">[back to gallery]</a>
				</p>
			</div>
		</div>
	</body>
</html>